-- 仁心難得
local renxingnande = fk.CreateSkill {
    name = "mcdh_renxingnande",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

renxingnande:addEffect(fk.EnterDying,{
    can_trigger =function(self, event, target, player, data)
        if not player:hasSkill(self) then return  false end
        local card = Fk:cloneCard("peach")
        return not (data.damage and data.damage.from == player) and target ~= player and target:getHandcardNum() >0 and player:usedSkillTimes(self.name, Player.HistoryRound) == 0
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local targets = {target.id}
        local cards =target:getCardIds(Player.Hand)
        local card = Fk:cloneCard("peach")
        card:addSubcards(cards)
        card.skillName = self.name
        --如果能用出来才结束使用
        room:useVirtualCard("peach", cards, player, target, self.name)
    end
})

Fk:loadTranslationTable {
    ["mcdh_renxingnande"] = "仁心難得",
    [":mcdh_renxingnande"] = "每轮限一次，其他角色不因你造成的伤害而进入濒死状态时，你可以将其所有手牌当一张【桃】对其使用。",
}

return renxingnande